<template>

    <el-dialog title="修改班级信息" :visible.sync="visible" @close="setFalse">

        <el-form :model="deliverData">
            <el-form-item label="学生编号" :label-width="formLabelWidth">
                <el-input v-model="deliverData.sstudentid" autocomplete="off"></el-input>
            </el-form-item>
            <el-form-item label="姓名" :label-width="formLabelWidth">
                <el-input v-model="deliverData.sname" autocomplete="off"></el-input>
            </el-form-item>
            <el-form-item label="性别" :label-width="formLabelWidth">
                <el-input v-model="deliverData.ssex" autocomplete="off"></el-input>
            </el-form-item>
            <el-form-item label="年龄" :label-width="formLabelWidth">
                <el-input v-model="deliverData.sage" autocomplete="off"></el-input>
            </el-form-item>
            <el-form-item label="电话" :label-width="formLabelWidth">
                <el-input v-model="deliverData.sphone" autocomplete="off"></el-input>
            </el-form-item>
            <el-form-item label="班级编号" :label-width="formLabelWidth">
                <el-input v-model="deliverData.sclassid" autocomplete="off"></el-input>
            </el-form-item>
            <el-form-item label="班级类别" :label-width="formLabelWidth">
                <el-input v-model="deliverData.sclassname" autocomplete="off"></el-input>
            </el-form-item>
            <el-form-item label="宿舍" :label-width="formLabelWidth">
                <el-input v-model="deliverData.sdormitoryid" autocomplete="off"></el-input>
            </el-form-item>
        </el-form>
        <div slot="footer" class="dialog-footer">
            <el-button @click="setFalse">取 消</el-button>
            <el-button type="primary" @click="updateClass()">确 定</el-button>
        </div>
    </el-dialog>
</template>

<script>
    import instance from "@/utils/request";

    export default {
        name: "update",
        data(){
            return{
                formLabelWidth: '120px',
                form:[]
            }
        },
        props:{
            visible:{
                type:Boolean,
                default:false,
                required: true,
            },
            deliverData:{
                type: Object,
                required: null
            }
        },
        methods:{
            updateClass(){
                instance.post("/dStudent/update?",this.deliverData).then(res=>{
                    this.deliverData={};
                });
                this.setFalse();
            },
            setFalse(){
                this.$emit('set');
            }
        }

    }
</script>

<style scoped>

</style>
